import { color } from '../src/utils/theme'

const Mock = require('mockjs')
const config = require('../src/utils/config')

const { apiPrefix } = config

const Dashboard = Mock.mock({
  'recentSales|36': [
    {
      'id|+1': 1,
      position:'成都',
      yearOutPut:Mock.Random.integer(1, 2000),
      yesterdaySee:Mock.Random.integer(1, 20000),
      allSee:Mock.Random.integer(1, 20000),
      mouthFeel:Mock.Random.integer(1, 5),
      feature:Mock.Random.integer(1, 5),
      service:Mock.Random.integer(1, 5),
      name: '@last',
      'status|1-4': 1,
      date () {
        return `${Mock.Random.integer(2015, 2016)}-${Mock.Random.date('MM-dd')} ${Mock.Random.time('HH:mm:ss')}`
      },
      'price|10-200.1-2': 1,
    },
  ],
})

module.exports = {
  [`GET ${apiPrefix}/dashboard`] (req, res) {
    res.json(Dashboard)
  },
}
